
package com.be.beadmin.device.repository;

import com.be.beadmin.device.entity.SpareFile;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
* @author zty
* @date 2023-10-17
**/
public interface SpareFileRepository extends JpaRepository<SpareFile, String>, JpaSpecificationExecutor<SpareFile> {

    SpareFile findSpareFileByIdAndDelete(String id, Integer delete);

    SpareFile findSpareFileById(String id);

    int countSpareFilesByFileNameAndSpareNameAndDelete(String fileName, String spareName, Integer delete);

    int countSpareFilesByFileNameAndVersionAndDelete(String fileName, String version, Integer delete);
}